(1) Field of the Invention
The present invention relates to a debugging assistance technique, and in particular to a technique for setting a breakpoint in a program that includes conditional instructions, using a software break technique that is one debugging function.
(2) Description of the Related Art
Processors developed in recent years are capable of executing conditional instructions that specify an execution condition of the instruction to the instruction itself.
When debugging a program that is executable by a processor, a breakpoint may be set in the program using a software break technique. A software break technique is a technique of rewriting an instruction that is in a position set as a breakpoint into a break instruction (one type of debug instruction) for executing interruption processing. A breakpoint is an instruction position at which, during execution of the program that is the target of debugging, the program is suspended.
According to the software break technique, an arbitrary instruction in the instruction memory is rewritten into a break instruction, and the break instruction is executed by a processor that has a break instruction in its instruction set, an emulator that simulates the functions of the processor, and the like.
The processor, emulator and the like read the break instruction from the instruction memory, decode the read break instruction, and by executing the decoded break instruction, cause an interruption and suspend execution of the program.
However, when executing a program with a breakpoint set at a conditional instruction using a software break technique, if a break instruction is read, a conventional processor or the like causes an interruption and suspends execution of the program even if the execution condition specified by the break instruction is not satisfied.
Japanese Patent Application Publication No. H11-341077 discloses the following interruption control method as one way of solving the aforementioned problem. When the processor executes a break instruction and an interruption occurs, a debugging device judges whether or not the execution condition of a conditional instruction before the conditional instruction is rewritten into a break instruction is satisfied, and the processor recommences the execution of the program if the execution condition is judged not to have been satisfied.
There is a desire among those involved in program development to reduce the time taken for debugging, in order to increase efficiency.
However, with the described interruption control method, the debugging device intervenes each time execution of the program is stopped at a breakpoint. Since the intervention of the debugging device is one factor preventing reduction of the time taken for debugging, the described interruption control method does not sufficiently respond to the desires of those involved in program development.